﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Super.Admin.Entities
{
    [Table("sys_permission")]
    public class PermissionEntity
    {
        [Key]
        [Required]
        [Column("id")]
        public int Id { get; set; }  // Primary Key
        [Column("name")]
        public string? Name { get; set; } // Permission name
        [Column("type")]
        public int Type { get; set; } // 0:目录  1: Menu, 2: Button
        [Column("parent_id")]
        public int ParentId { get; set; } // Parent ID for hierarchical structure
        [Column("permission_key")]
        public string? Permissionkey { get; set; } // 权限标识
        [Column("path")]
        public string? Path { get; set; } // 路由
        [Column("icon")]
        public byte[]? Icon { get; set; } // 图标
        [Column("sort")]
        public int Sort { get; set; } // 排序
        [Column("is_active")]
        public int IsActive { get; set; } // 是否启用 0:禁用 1:启用
    }
}
